#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QDialog>
#include <checkmouse.h>
//#include "hardinterfacetest/hardinterfacetest.h"
#include <QPainter>
#include<vector>

class DesktopWidget;
class SidebarWidget;
class UserWidget;
class SettingsWidget;
class QPushButton;
class GamesWidget;
class QLabel ;
class QDialog;
extern int havecal;

//class Paincor : public QWidget
//{
//    Q_OBJECT

//public:
//    Paincor(QWidget *parent = 0);
//    void mousePressEvent(QMouseEvent *event);
//    int xx,yy;
////    ~Paincor();

//protected:
//    void paintEvent(QPaintEvent *event);
//};

class tmpQDialog: public QDialog
{
    Q_OBJECT

public:
    tmpQDialog(QWidget *parent = 0);
    ~tmpQDialog();
    QLabel * settmp;

protected:
    void mousePressEvent(QMouseEvent e);
private slots:
    void tmpclose();
};

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = 0);
    ~Widget();
    int xx ,yy;

protected:
  //  void mousePressEvent(QMouseEvent e);

    void mouseMoveEvent(QMouseEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void paintEvent(QPaintEvent *event);
    void mouseReleaseEvent(QMouseEvent *e);

private slots:
    void slotShowUserWidget();
    void slotShowDesktopWidget();
    void slotShowGameWidget();
    void slotShowSettingsWidget();

    void slotLock();

    void slotShowWeiqianToolsWidget();
    void slotShowNetSettingsWidget();
    void slotShowWifiSettingsWidget();
    void slotShowCeshiSettingsWidget();
    void slotShowTouchSettingsWidget();
    void slotShowCpuTempSettingsWidget();
    void slotShowGamePainWidget();
    void slotShowAboutWidget();
    void slotShowWebWidget();
    void slotShowTimeWidget();
    void slotShowPhotoWidget();
    void slotShowMusicWidget();
    void slotShowFolderWidget();
	void slotShowPerformanceWidget();
    void slotShowVersionInfoWidget();
    void slotShowRNDISWidget();

    void slotHideSmokeBtn();

    void slotTimerOpenBacklight();

private:
    void loadQss();
    void widgetHidden();
    QString readSubQss();
    QString readQssFromName(QString fileName);

private:
    DesktopWidget *m_pDesktopWidget;
  //  CeshiSettings *mp_wqceshi;
    SidebarWidget *m_pSidebarWidget;
    SettingsWidget *m_pSettingsWidget;
    UserWidget *m_pUserWidget;
    GamesWidget *m_pGameWidget;

    QPushButton *m_pSmokeBtn;
    QLabel *m_pLockTip;

    bool m_isLock;
    int m_CalFlag;
    int m_CalNo;
    CheckThread checkmouse1;
};

#endif // WIDGET_H
